package com.abhinav.jaxb;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.namespace.QName;

import com.abhinav.jaxb.model.Address;
import com.abhinav.jaxb.model.Book;
import com.abhinav.jaxb.model.Bookstore;
import com.abhinav.jaxb.model.Customer;
import com.abhinav.jaxb.model.Student;

public class StudentDemo {

	/**
	 * @param args
	 * @throws JAXBException 
	 */
	public static void main(String[] args) throws JAXBException {
		JAXBContext jc = JAXBContext.newInstance(Book.class);
		
		//Student student = new Student();
		Bookstore book = new Bookstore();
		JAXBElement<Bookstore> je2 = new JAXBElement<Bookstore>(new QName("bookstore"), Bookstore.class, book);
		
		Marshaller marshaller = jc.createMarshaller();
		marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
		marshaller.marshal(je2, System.out);

	}

}
